#ifndef _CINDICATOR_MA_H
#define _CINDICATOR_MA_H
namespace GSTrader
{
	namespace Indicator
	{
		class INDICATOR_API MA : public CIndicator
		{
		public:
			MA();
			virtual ~MA();
			virtual CIndicator* CreateInstance();

			virtual double Calculate(int nIndex);

			void SetOneParam(int nLength, int barType);
			virtual void SetParam(double* pdParam);

			virtual void RefreshData();
			void CalcMa(int nIndex, int nLineIndex);
		private:
			int m_nLines;		
			int* m_piLength;
			int m_barType;
		};
	}
}

#endif